<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://www.w3.org/1999/XSL/Transform">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
    <div th:replace="common/IncludeTop">
    </div>

    <div id="Content">
        <div id="BackLink">
            <a th:href="@{'/catalog/viewProduct?productId='+${product.productId}}">Return To <label th:text="${product.productId}">Product Id</label></a>
        </div>

        <table align="center">
            <tr>
                <td>
                    <img th:src="@{../{filename}(filename=${product.description})}" alt="description">
                    <table th:text="${product.descriptionWords}">Description Words</table>
                </td>
            </tr>
            <tr>
                <td th:text="${item.itemId}"><b> itemId </b></td>
            </tr>
            <tr>
                <td th:text="${item.attribute1 != null? item.attribute1:''}+${item.attribute2 != null? item.attribute2:''}+${item.attribute3 != null? item.attribute3:''}+${item.attribute4 != null? item.attribute4:''}+${item.attribute5 != null? item.attribute5:''}">
                    <b>
                        <font size="4">
                        </font>
                    </b>
                </td>
            </tr>
            <tr>
                <td th:text="${product.name}"></td>
            </tr>
            <tr>
                <div th:switch="${item.quantity <= 0}">
                    <td th:case="true">Back ordered.</td>
                    <td th:case="false">In stock.</td>
                </div>
            </tr>
            <tr>
                <td th:text="'$' + ${item.listPrice}">
                </td>
            </tr>
                <tr th:if="${session.account != null}">
                    <td>
                        <a class="Button" th:href="@{'/cart/addItemToCart?workingItemId='+${item.itemId}}">Add to Cart</a>
                    </td>
                </tr>
        </table>
    </div>

    <div th:replace="common/IncludeBottom">
    </div>
</body>
</html>